<template>
  <div>
    <a-table
      ref="table"
      size="middle"
      bordered
      rowKey="id"
      :columns="columns"
      :dataSource="dataSource"
      :pagination="ipagination"
      :loading="loading"
      @change="handleTableChange"
    >
      <span slot="action" slot-scope="text, record">
        <a @click="handleDetail(record, '')">查看</a>
        <a-divider type="vertical" />
        <a @click="handleEdit(record, '')">审批</a>
      </span>
    </a-table>

    <dsModel :role="role" @updated="handleModelSubmit" @load="loadData(1)" ref="modalForm"></dsModel>
  </div>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import columns from '../indexColumns'
import dsModel from './dsModel.vue'
export default {
  mixins: [JeecgListMixin],
  components: {
    dsModel,
  },
  props: ['role'],
  mounted() {},
  data() {
    return {
      // 表头
      columns: columns(this),
      dataSource: [],
      url: {
        list: '/performcheck/checkDeptInfo/queryPendingList',
      },
      disableMixinCreated:true,
    }
  },
  mounted(){
    this.handleModelSubmit({
      auditFlag:'0'
    })
  },
  methods: {
    // 重新加载
    handleModelSubmit(params) {
      this.queryParam = params
      this.loadData(1)
    },
  },
}
</script>

<style>
</style>